<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">

    <title th:text="${user==null?'用户新增':'用户编辑'}"></title>

</head>

<body>
<h1 th:text="${user==null?'用户新增':'用户编辑'}"></h1>
<form action="/user/doAdd" method="post">
    <input type="hidden" name="id" th:value="${user==null?'':user.id}">
    用户名:<input type="text" name="userName" th:value="${user==null?'':user.userName}" ><br/>
    密码:<input type="password" name="password" th:value="${user==null?'':user.password}" ><br/>
    <input type="submit" value="保存">
</form>
</body>

</html>